@define-mixin ellipsis $max-width: none {
    max-width: $max-width;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@define-mixin transition-rotate $angle-from: 0, $angle-to: -90, $duration: .3s, $trigger-class: open {
    transform: rotate($(angle-from)deg);
    transition: all $duration ease;
    display: inline-block;

    &.$(trigger-class) {
        transform: rotate($(angle-to)deg);
    }
}

@define-mixin clearfix {
    &:after {
        display: block;
        content: "";
        clear: both;
    }
}

@define-mixin triangle-check-top-left $width, $height, $bgColor, $textColor: #fff {
    &::before {
        content: "";
        width: 0;
        height: 0;
        border-style: solid;
        position: absolute;
        top: -1px;
        left: -1px;
        border-width: $(height)px $(width)px 0 0;
        border-color: $bgColor transparent transparent transparent;
    }

    &::after {
        content: "\e977";
        color: $textColor;
        position: absolute;
        left: 4px;
        top: 0;
        font-weight: bold;
        font-family: bk-icons-linear!important;
    }
}

@define-mixin triangle-check-bottom-right $width, $bgColor, $textColor: #fff {
    &::before {
        content: "";
        width: 0;
        height: 0;
        border-style: solid;
        position: absolute;
        right: -1px;
        top: -1px;
        border-width: $(width)px;
        border-color: $bgColor;
    }

    &::after {
        content: "\e977";
        color: $textColor;
        position: absolute;
        right: 3px;
        top: 5px;
        font-weight: bold;
        font-size: 12px;
        font-family: bk-icons-linear!important;
    }
}

@define-mixin text-ellipsis $max-line: none {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: $max-line;
    -webkit-box-orient: vertical;
}
